package com.tianql.controller;


import com.tianql.core.ApiResult;
import com.tianql.pojo.OrderTbl;
import com.tianql.service.OrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/order")
public class OrderTblController {
    @Autowired
    private OrderServiceImpl orderService;

    @PostMapping("createOrder")
    public ApiResult createOrder(@RequestBody OrderTbl orderTbl) throws InterruptedException {
        orderService.createOrder(orderTbl);
        return new ApiResult(200, "创建订单成功", null);
    }
}
